﻿using DataBase;
using Microsoft.Extensions.DependencyInjection;
using WebDataGet.Services;

namespace WebDataGet
{
    internal class Program
    {
        static void Main(string[] args)
        {
            var service = new ServiceCollection();
            service.AddSingleton<FreeSqlService>();
            service.AddSingleton<ConfigService>();
            service.AddSingleton<NlogService>();
            service.AddSingleton<MainService>();
            service.AddSingleton<WebDataGetService>();
            var builder = service.BuildServiceProvider();
            var mainService = builder.GetService<MainService>();
            mainService.Main();

            Console.WriteLine("Hello, World!");
            Console.ReadKey();

        }
    }
}
